package com.liucxu.qiushimeinv.Model.Impl;


import com.liucxu.qiushimeinv.Api.UserService;
import com.liucxu.qiushimeinv.Model.Bean.LoginResponseBean;
import com.liucxu.qiushimeinv.Model.ILoginModel;
import com.liucxu.qiushimeinv.Utils.ServiceFactory;

import java.util.HashMap;

import rx.Observable;

/**
 * 登录接口实现类
 * Created by liukanshan on 2017/1/1.
 */

public class LoginModelImpl implements ILoginModel {
    @Override
    public Observable<LoginResponseBean> login(String user_name, String password) {
        HashMap<String,String> values=new HashMap<>();
        values.put("userName",user_name);
        values.put("password",password);
        values.put("task","login");
        return ServiceFactory.GetInstance().createService(UserService.class).login(values);
    }
}
